//
//  ChannelCell.swift
//  NetEasyNew
//
//  Created by 蔡万鸿 on 15/6/7.
//  Copyright (c) 2015年 黄花菜. All rights reserved.
//

import UIKit

class ChannelCell: UICollectionViewCell {
    
    var newsVC: NewsTableViewController?
    
    //新闻地址的url
    var urlString: String? {
    
        didSet {
            
            self.newsVC?.setUrl(urlString!)
        }
    }

    override func awakeFromNib() {
        
        var sb = UIStoryboard(name: "News", bundle: nil)
        
        self.newsVC = sb.instantiateInitialViewController() as? NewsTableViewController

        self.addSubview(self.newsVC!.view)

    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        
        self.newsVC?.view.frame = self.bounds
    }
}
